/**
 * 
 */
package com.aceitunaproject.server.cargo;

import com.aceitunaproject.server.materialgoods.MaterialGood;
import com.aceitunaproject.server.player.Player;
import com.aceitunaproject.shared.exceptions.gamerules.IllegalActionException;

/**
 * Classes that implement this interface should be able to deliver or accept
 * cargo when needed and determine if the player doing it has the required
 * permissions.
 * 
 * @author Federico Bergstein
 * 
 */
public interface CargoContainer {

	/**
	 * gets cargo blocks from the container
	 * 
	 *@param player
	 *            the player that wants to retire the cargo blocks
	 * @param type
	 *            the type of material good
	 * @param blocks
	 *            the number of blocks to retire.
	 */
	void retireCargo(Player player, MaterialGood type, long blocks)
			throws IllegalActionException;

	/**
	 * adds cargo blocks to the container
	 * 
	 * @param player
	 *            the player that wants to add the cargo blocks
	 * @param type
	 *            the type of material good
	 * @param blocks
	 *            the number of blocks to retire.
	 */
	void addCargo(Player player, MaterialGood type, long blocks)
			throws IllegalActionException;

}
